<?php

if (USER_STATUS && isset($_REQUEST["vote_type"])) {
    require_once("class/bpVote.class.php");
    switch ($_REQUEST["vote_type"]) {
        case "beer_beer":
            if (isset($_REQUEST["oid"]) && isset($_REQUEST["rang"])) {
                bpVote::addVoteToMaterial(USER_ID, "beer_beer", $_REQUEST["oid"], $_REQUEST["rang"]);
                echo "good vote";
            }
            break;
    }
} else {
    echo "error";
}
?>